<template>
  <div>
    <el-form ref="form" :model="searchData" :rules="rules" label-width="100px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="群组" prop="user_groupCodes">
            <el-select
              v-model="searchData.user_groupCodes"
              placeholder="请选择"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "TenantForm",
  data() {
    return {
      searchData: {
        user_groupCodes: ""
      },
      options: [
        {
          value: "1",
          label: "群组1"
        },
        {
          value: "2",
          label: "群组2"
        }
      ],
      rules: {
        user_groupCodes: [
          { required: true, message: "请选择群组", trigger: "change" }
        ]
      }
    };
  },
  methods: {
    init(params) {
      const initForm = {
        user_groupCodes: ""
      };
      this.searchData = { ...initForm, ...params };
    }
  }
};
</script>
